#include <iostream>

#define N 10

int max(int arr[],int n){
  int max=arr[0];
  for(int i=1;i<n;i++){
    if(arr[i]>max){
      max=arr[i];
    }
  }
  return max;
}

int main() {
  int nums[N]={1,2,3,4,10,6,7,8,9,5};
  for(int i=0;i<N;i++){
    std::cout<<nums[i]<<" ";
  }
  std::cout<<std::endl<<"中的最大值是："
    <<(max(nums,N))<<std::endl;
  return 0;
}
